Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/tokens

Package Overview
Dependencies
Maintainers
5
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/tokens

leafyGreen UI Kit Tokens

  • 2.11.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created

What is @leafygreen-ui/tokens?

@leafygreen-ui/tokens is a design token library provided by MongoDB's LeafyGreen UI team. It offers a set of design tokens that can be used to maintain consistency in design across different components and applications. These tokens include colors, typography, spacing, and other design-related constants.

What are @leafygreen-ui/tokens's main functionalities?

Colors

This feature provides a set of predefined color tokens that can be used to ensure consistent color usage across your application.

import { color } from '@leafygreen-ui/tokens';

const primaryColor = color.green.base;
console.log(primaryColor); // Outputs: '#13AA52'

Typography

This feature offers typography tokens such as font sizes and line heights to maintain consistent text styling.

import { fontSize, lineHeight } from '@leafygreen-ui/tokens';

const headingStyle = {
  fontSize: fontSize.h1,
  lineHeight: lineHeight.h1,
};
console.log(headingStyle); // Outputs: { fontSize: '32px', lineHeight: '40px' }

Spacing

This feature provides spacing tokens that can be used for margins and paddings to ensure consistent spacing throughout your application.

import { spacing } from '@leafygreen-ui/tokens';

const containerStyle = {
  padding: spacing[4],
};
console.log(containerStyle); // Outputs: { padding: '16px' }

Other packages similar to @leafygreen-ui/tokens

FAQs

Package last updated on 16 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc